import http from "@/api";

/**
 * @name 门禁点管理模块
 */
// 获取门禁组列表
export const getGroupList = (params = {}) => {
  return http.post(`/rule-group/access/query`, params, { noLoading: true });
};

// 获取门禁点列表
export const getDoorList = (params = {}) => {
  return http.post(`/door/query`, params, { noLoading: true });
};

// 新增门禁点
export const addGroup = (params = {}) => {
  return http.post(`/rule-group/access/add`, params);
};

// 删除门禁点
export const deleteGroup = (params: { roomId: string }) => {
  return http.post(`/rule-group/access/delete`, params);
};

// 酒店选择列表
export const getAreaSelList = (params = {}) => {
  return http.get(`/lookup/areas`, params, { noLoading: true });
};

/**
 * 增加用户锁地图树节点
 * @param params
 */
export const addGroupNode = (params = {}) => {
  return http.post(`/rule-group/save`, params, { noLoading: true });
};

/**
 * 修改用户锁地图树节点
 * @param params
 */
export const editGroupNode = (params = {}) => {
  return http.post(`/rule-group/save`, params, { noLoading: true });
};

/**
 * 删除用户锁地图树节点
 * @param params
 */
export const delGroupNode = (params = {}) => {
  return http.post(`/rule-group/delete`, params, { noLoading: true });
};
